"""bookmanager URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include,path,re_path

'''
1.urlpatterns是固定写法，它的值是列表
2.我们在浏览器中输入的路径会和urlpatterns的每一项顺序进行匹配
    如果匹配成功，则直接引导到相应的模块
    如果匹配不成功，则直接返回404
3.在浏览器中输入的路由中，只有端口以后部分参与正则匹配

'''

'''
在django2.0中已经改为path和re_path,re_path和url用法一样
'''

urlpatterns = [
    path('admin/', admin.site.urls),
    # 如果不是admin就引导到book
    re_path(r'^',include('book.urls'))
]
